//调用kindeditor上传图片
function uploadImage(path,inputID){
	KindEditor.basePath = path+'/js/kindeditor/';
	var editor = KindEditor.editor({
		uploadJson : path+'/upload_json.jsp',
		fileManagerJson : path+'/file_manager_json.jsp',
		allowFileManager : true
	});
	editor.loadPlugin('image', function() {
		editor.plugin.imageDialog({
			imageUrl : KindEditor('#'+inputID+'').val(),
			clickFn : function(url, title, width, height, border, align) {
				KindEditor('#'+inputID+'').val(url);
				document.getElementById('image_'+inputID+'').src=url;
				editor.hideDialog();
			}
		});
	});
}
//导入EXCEL数据
function loadExcel(objectid,path){
	KindEditor.basePath = path+'/js/kindeditor/';
	var editor = KindEditor.editor({
		uploadJson : path+'/upload_json.jsp',
		fileManagerJson : path+'/file_manager_json.jsp',
		allowFileManager : true
	});
	editor.loadPlugin('insertfile', function() {
		editor.plugin.fileDialog({
			fileUrl : '',
			clickFn : function(url, title) {
				//KindEditor('#url').val(url);
				//导入Excel
				//location.href="load.jsp?id="+objectid+"&url="+url+"&t="+Math.random();
				XMLRequest(function (input){alert(input.trim());},"load.jsp?id="+objectid+"&url="+url);
				editor.hideDialog();
			}
		});
	});
}
//导入ZIP数据
function loadZip(objectid,path){
	KindEditor.basePath = path+'/js/kindeditor/';
	var editor = KindEditor.editor({
		uploadJson : path+'/upload_json.jsp',
		fileManagerJson : path+'/file_manager_json.jsp',
		allowFileManager : true
	});
	editor.loadPlugin('insertfile', function() {
		editor.plugin.fileDialog({
			fileUrl : '',
			clickFn : function(url, title) {
				//KindEditor('#url').val(url);
				//导入Excel
				//location.href="load.jsp?id="+objectid+"&url="+url+"&t="+Math.random();
				XMLRequest(function (input){alert(input.trim());},"loadZip.jsp?id="+objectid+"&url="+url);
				editor.hideDialog();
			}
		});
	});
}